Skip to main content
POST
/
v1
/
flux-pro-1.0-canny-finetuned
Generate an image with FLUX.1 Canny [pro] finetune using a control image.
curl --request POST \
  --url https://api.us1.bfl.ai/v1/flux-pro-1.0-canny-finetuned \
  --header 'Content-Type: application/json' \
  --header 'x-key: <api-key>' \
  --data '{
  "finetune_id": "my-finetune",
  "finetune_strength": 1.1,
  "prompt": "ein fantastisches bild",
  "canny_low_threshold": 250,
  "canny_high_threshold": 250,
  "control_image": "<string>",
  "prompt_upsampling": false,
  "seed": 42,
  "steps": 50,
  "output_format": "jpeg",
  "guidance": 30,
  "safety_tolerance": 2,
  "webhook_url": "<string>",
  "webhook_secret": "<string>"
}'
{
  "id": "<string>",
  "polling_url": "<string>"
}

Authorizations

x-key
string
header
required

Body

application/json
finetune_id
string
required

ID of the fine-tuned model you want to use.

Example:

"my-finetune"

prompt
string
required

Text prompt for image generation

Example:

"ein fantastisches bild"

control_image
string
required

Base64 encoded image to use as control input

finetune_strength
number
default:1.1

Strength of the fine-tuned model. 0.0 means no influence, 1.0 means full influence. Allowed values up to 2.0

Required range: 0 <= x <= 2
canny_low_threshold
integer | null
default:50

Low threshold for Canny edge detection

Required range: 0 <= x <= 500
canny_high_threshold
integer | null
default:200

High threshold for Canny edge detection

Required range: 0 <= x <= 500
prompt_upsampling
boolean
default:false

Whether to perform upsampling on the prompt

seed
integer | null

Optional seed for reproducibility

Example:

42

steps
integer
default:50

Number of steps for the image generation process

Required range: 15 <= x <= 50
output_format
enum<string> | null
default:jpeg

Output format for the generated image. Can be 'jpeg' or 'png'.

Available options:
jpeg,
png
guidance
number
default:30

Guidance strength for the image generation process

Required range: 1 <= x <= 100
safety_tolerance
integer
default:2

Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict.

Required range: 0 <= x <= 6
webhook_url
string<uri> | null

URL to receive webhook notifications

Required string length: 1 - 2083
webhook_secret
string | null

Optional secret for webhook signature verification

Response

Successful Response

  • AsyncResponse
  • AsyncWebhookResponse
id
string
required
polling_url
string
required